<template>
  <div class="error" v-bind:style="{'height':clientHeight + 'px'}">
    <errorHead v-on:getDev="getDev"></errorHead>
    <errDev  :devList="devList"></errDev>
      <div class="input-button blue" @click="$router.back(-1)">返回首页</div>
  </div>
</template>

<script>
import errorHead from '../../components/error/head'
import errDev from '../../components/error/errDev'
import {EDEV} from '../../api/request'
import { Toast } from 'vue-ydui/dist/lib.rem/dialog'
export default {
  components: {errorHead, errDev},
  data () {
    return {
      clientHeight: document.documentElement.clientHeight,
      devList: []
    }
  },
  methods: {
    getDev: function (placeCode) {
      EDEV(placeCode).then(res => {
        if (res.data.code === 200) {
          this.devList = res.data.data
        } else {
          Toast(res.data.msg)
        }
      })
    }
  }
}
</script>

<style scoped>
  .error{
    width: 100%;
    background-color: #ebebeb;
  }
  .blue{
    position: absolute;
    left: calc(50% - 3.25rem);
    bottom: 1.52rem;
    box-shadow: 0 0 0.2rem 0.1rem rgba(194, 198, 199, 0.1);
    border-radius: 0.1rem;
    background-color: #0092f8;
  }
</style>
